{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[[255   0   0]\n  [  0 255   0]\n  [  0   0 255]]\n\n [[255 255   0]\n  [255   0 255]\n  [  0 255 255]]\n\n [[255 255 255]\n  [128 128 128]\n  [  0   0   0]]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQ8AAAD8CAYAAABpXiE9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAADfRJREFUeJzt3W2MpWV9x/HvryxgUqg87LZsl12R\nlGhp0waYIGhjSNUEiWGbyAt8IWAwG6yk2mhSIokPJE3RFza1EAkqERqDpGh0NBiDBYp9AWWWLA/L\nBllIDJPdyAp2kWiga/99Mbd2OpyZOXud+zwsfj/Jybnvc1/nvv57TfKb637aSVUhSYfrd6ZdgKQj\nk+EhqYnhIamJ4SGpieEhqYnhIanJSOGR5KQkdyd5qns/cZV2v0qyq3vNj9KnpNmQUe7zSPI54IWq\nuj7JNcCJVfV3A9q9VFXHjVCnpBkzang8CVxQVfuTbAbuq6o3DWhneEivMaOGx39V1QnL1n9WVa86\ndElyCNgFHAKur6pvrbK/HcAOgN+Fc97cXNlr385zpl3BEcBBGsLOn1bVppZvrhseSX4AnDJg07XA\nrUOGxx9W1b4kpwP3AO+oqqfX6ncuqYVh/gW/peJTBetzkIaQnVU11/LNDes1qKp3rtpt8pMkm5cd\ntjy3yj72de/PJLkPOAtYMzwkzbZRL9XOA5d3y5cD317ZIMmJSY7tljcCbwOeGLFfSVM2anhcD7wr\nyVPAu7p1kswl+XLX5o+BhSSPAPeydM7D8JCOcCOdMB0nz3mszcP5IThIQ2g/5+EdppKaGB6Smh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matplotlib.figure.Figure at 0x1219bd550>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import cv2\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "img = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]],\n",
    "                [[255, 255, 0], [255, 0, 255], [0, 255, 255]],\n",
    "                [[255, 255, 255], [128, 128, 128], [0, 0, 0]]], dtype=np.uint8)\n",
    "print(img)\n",
    "plt.imshow(img)\n",
    "\n",
    "# 两种存储方式的图片不相同。cv2的写入会发生变化。？？据说是bug，改成tif格式,有提升单还是不完全一样。\n",
    "# plt.imsave('Books/深度学习与计算机视觉/ch06-opencv基础/plt.jpg', img)\n",
    "cv2.imwrite('Books/深度学习与计算机视觉/ch06-opencv基础/cv2.bmp', img)\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[[  0   0 255]\n  [  0 255   0]\n  [255   0   0]]\n\n [[  0 255 255]\n  [255   0 255]\n  [255 255   0]]\n\n [[255 255 255]\n  [128 128 128]\n  [  0   0   0]]]\n"
     ]
    }
   ],
   "source": [
    "# 存取图像\n",
    "import cv2\n",
    "color_img = cv2.imread('Books/深度学习与计算机视觉/ch06-opencv基础/plt.jpg')\n",
    "print(color_img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 30 148  76]\n [176 109 227]\n [255 130   0]]\n(3, 3)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQ8AAAD8CAYAAABpXiE9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vb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dwMlJNk65pomp1b2uMdE5WmVNx2yWwuP3quoALP7DAi9Zpt+JSXYmuStJ\n3wGzCXhsYHmBIyf5f/tU1WHgEHBqz3Uca00A7+wOgb+RZPMY61nJauudtDckuS/Jd5K8ehIDdqe0\nrwXuXrJpanN0lJrgGOeoj+c8Vi3JbcDpQzZ94hh2c2ZV7U9yNnB7kt1V9Ug/FTLsCGLpvezV9OnT\nasb7NnBjVf0qyeUsHhn9yRhrOppJz89q3Au8tP7v9YibgaO+HjGq7nWNbwIfroH3vJ7bPOQnY5+j\nFWo65jma6JFHVb21ql4z5HML8KPnDt2678eX2cf+7vtR4HsspmhfFoDBP7XPYPFFvqF9kqwFXsR4\nD5lXrKmqDlbVr7rFLwOvG2M9K1nNHE5UTfj1iJVe12AKczSOV0hm6bRlHri0a18K3LK0Q5JTkqzv\n2htYfLp16f83ZBT3AOckeVmSE1i8ILr0js5gnRcDt1d3xWlMVqxpyfnyRSye007LPPCe7o7C+cCh\n505Hp2WSr0d04xz1dQ0mPEerqalpjiZxBXqVV4RPBf4FeLj7fnG3fg74Std+I7CbxTsOu4H3jaGO\nC1m8Gv0I8Ilu3aeAi7r2icA/AfuA/wDOnsDcrFTT3wF7unm5A/j9MdZyI3AA+DWLf4K+D7gcuLzb\nHuCLXa27gbkJzM9KNV0xMD93AW8cYy1/zOIpyP3Aru5z4TTnaJU1HfMc+Xi6pCazdNoi6ThieEhq\nYnhIamJ4SGpieEhqYnhIamJ4SGryP6N1Dt4VOZT4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x12188cc50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 直接读取单通道\n",
    "color_img2 = cv2.imread('Books/深度学习与计算机视觉/ch06-opencv基础/cv2.jpg', cv2.IMREAD_GRAYSCALE)\n",
    "print(color_img2)\n",
    "print(color_img2.shape)\n",
    "plt.imshow(color_img2)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
